

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>5.10. TRJ/MDCRD file format (Amber) — MDAnalysis.coordinates.TRJ &mdash; MDAnalysis v0.7.5-devel documentation</title>
    <link rel="stylesheet" href="../../_static/sphinxdoc.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '0.7.5-devel',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within MDAnalysis v0.7.5-devel documentation"
          href="../../_static/opensearch.xml"/>
    <link rel="shortcut icon" href="../../_static/mdanalysis-logo.ico"/>
    <link rel="top" title="MDAnalysis v0.7.5-devel documentation" href="../../index.html" />
    <link rel="up" title="5. Coordinates modules" href="../coordinates_modules.html" />
    <link rel="next" title="5.11. Gromacs TRR file IO — MDAnalysis.coordinates.TRR" href="TRR.html" />
    <link rel="prev" title="5.9. PQR file format — MDAnalysis.coordinates.PQR" href="PQR.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="TRR.html" title="5.11. Gromacs TRR file IO — MDAnalysis.coordinates.TRR"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="PQR.html" title="5.9. PQR file format — MDAnalysis.coordinates.PQR"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">MDAnalysis v0.7.5-devel documentation</a> &raquo;</li>
          <li><a href="../coordinates_modules.html" accesskey="U">5. Coordinates modules</a> &raquo;</li> 
      </ul>
    </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../index.html">
              <img class="logo" src="../../_static/mdanalysis-logo-200x150.png" alt="Logo"/>
            </a></p>
  <h3><a href="../../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">5.10. TRJ/MDCRD file format (Amber) &#8212; <tt class="docutils literal"><span class="pre">MDAnalysis.coordinates.TRJ</span></tt></a><ul>
<li><a class="reference internal" href="#units">5.10.1. Units</a></li>
<li><a class="reference internal" href="#limitations">5.10.2. Limitations</a></li>
<li><a class="reference internal" href="#classes">5.10.3. Classes</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="PQR.html"
                        title="previous chapter">5.9. PQR file format &#8212; <tt class="docutils literal docutils literal"><span class="pre">MDAnalysis.coordinates.PQR</span></tt></a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="TRR.html"
                        title="next chapter">5.11. Gromacs TRR file IO &#8212; <tt class="docutils literal"><span class="pre">MDAnalysis.coordinates.TRR</span></tt></a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/documentation_pages/coordinates/TRJ.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <span class="target" id="module-MDAnalysis.coordinates.TRJ"></span><div class="section" id="trj-mdcrd-file-format-amber-mdanalysis-coordinates-trj">
<h1>5.10. TRJ/MDCRD file format (Amber) &#8212; <a class="reference internal" href="#module-MDAnalysis.coordinates.TRJ" title="MDAnalysis.coordinates.TRJ"><tt class="xref py py-mod docutils literal"><span class="pre">MDAnalysis.coordinates.TRJ</span></tt></a><a class="headerlink" href="#trj-mdcrd-file-format-amber-mdanalysis-coordinates-trj" title="Permalink to this headline">¶</a></h1>
<p>Classes to read formatted <a class="reference external" href="http://ambermd.org">Amber</a> TRJ coordinate files as defined in <a class="reference external" href="http://ambermd.org/formats.html#trajectory">Amber
TRJ format</a>. It is also possible to directly read <em>bzip2</em> or <em>gzip</em>
compressed files.</p>
<p>Amber trajectories are recognised by the suffix &#8216;.trj&#8217; or &#8216;.mdcrd&#8217;
(possibly with an additional &#8216;.gz&#8217; or &#8216;.bz2&#8217;).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Support for Amber is <em>experimental</em> and feedback and contributions
are highly appreciated. Use the <a class="reference external" href="http://code.google.com/p/mdanalysis/issues/list">Issue Tracker</a> or get in touch on
the <a class="reference external" href="http://groups.google.com/group/mdnalysis-discussion">MDAnalysis mailinglist</a>.</p>
</div>
<div class="section" id="units">
<h2>5.10.1. Units<a class="headerlink" href="#units" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>lengths in Angstrom (Ã…)</li>
<li>time in ps (but see below)</li>
</ul>
</div>
<div class="section" id="limitations">
<h2>5.10.2. Limitations<a class="headerlink" href="#limitations" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Reads the ASCII <a class="reference external" href="http://ambermd.org/formats.html#trajectory">Amber TRJ format</a>, but not the <a class="reference external" href="http://ambermd.org/netcdf/nctraj.html">Amber netcdf</a> one
(yet).</li>
<li>Periodic boxes are only stored as box lengths A, B, C in an Amber
trajectory; the reader always assumes that these are orthorhombic
boxes.</li>
<li>The trajectory does not contain time information so we simply set
the time step to 1 ps (or the user could provide it as kwarg <em>delta</em>)</li>
<li>No direct access of frames is implemented, only iteration through
the trajectory.</li>
<li>Trajectories with fewer than 4 atoms probably fail to be read (BUG).</li>
<li>If the trajectory contains exactly <em>one</em> atom then it is always
assumed to be non-periodic (for technical reasons).</li>
</ul>
</div>
<div class="section" id="classes">
<h2>5.10.3. Classes<a class="headerlink" href="#classes" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="MDAnalysis.coordinates.TRJ.Timestep">
<em class="property">class </em><tt class="descclassname">MDAnalysis.coordinates.TRJ.</tt><tt class="descname">Timestep</tt><big>(</big><em>arg</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.TRJ.Timestep" title="Permalink to this definition">¶</a></dt>
<dd><p>Amber trajectory Timestep</p>
<dl class="attribute">
<dt id="MDAnalysis.coordinates.TRJ.Timestep.dimensions">
<tt class="descname">dimensions</tt><a class="headerlink" href="#MDAnalysis.coordinates.TRJ.Timestep.dimensions" title="Permalink to this definition">¶</a></dt>
<dd><p>unitcell dimensions (<cite>A, B, C, alpha, beta, gamma</cite>)</p>
<ul class="simple">
<li><cite>A, B, C</cite> are the lengths of the primitive cell vectors <cite>e1, e2, e3</cite></li>
<li><cite>alpha</cite> = angle(<cite>e1, e2</cite>)</li>
<li><cite>beta</cite> = angle(<cite>e1, e3</cite>)</li>
<li><cite>gamma</cite> = angle(<cite>e2, e3</cite>)</li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The Amber trajectory only contains box lengths
<cite>A,B,C</cite>; we assume an orthorhombic box and set all
angles to 90º.</p>
</div>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="MDAnalysis.coordinates.TRJ.TRJReader">
<em class="property">class </em><tt class="descclassname">MDAnalysis.coordinates.TRJ.</tt><tt class="descname">TRJReader</tt><big>(</big><em>trjfilename</em>, <em>numatoms=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.TRJ.TRJReader" title="Permalink to this definition">¶</a></dt>
<dd><p>Amber trajectory reader.</p>
<p>Reads the ASCII formatted <a class="reference external" href="http://ambermd.org/formats.html#trajectory">Amber TRJ format</a>. Periodic box information
is auto-detected.</p>
<p>The number of atoms in a timestep <em>must</em> be provided in the <cite>numatoms</cite>
keyword because it is not stored in the trajectory header and cannot be
reliably autodetected. The constructor raises a <tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt> if
<cite>numatoms</cite> is left at its default value of <tt class="xref docutils literal"><span class="pre">None</span></tt>.</p>
<p>The length of a timestep is not stored in the trajectory itself but can
be set by passing the <cite>delta</cite> keyword argument to the constructor; it
is assumed to be in ps. The default value is 1 ps.</p>
<p>Functionality is currently limited to simple iteration over the
trajectory.</p>
<dl class="method">
<dt id="MDAnalysis.coordinates.TRJ.TRJReader.close">
<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.TRJ.TRJReader.close" title="Permalink to this definition">¶</a></dt>
<dd><p>Close trj trajectory file if it was open.</p>
</dd></dl>

<dl class="attribute">
<dt id="MDAnalysis.coordinates.TRJ.TRJReader.numframes">
<tt class="descname">numframes</tt><a class="headerlink" href="#MDAnalysis.coordinates.TRJ.TRJReader.numframes" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of frames (obtained from reading the whole trajectory).</p>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.TRJ.TRJReader.open_trajectory">
<tt class="descname">open_trajectory</tt><big>(</big><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.TRJ.TRJReader.open_trajectory" title="Permalink to this definition">¶</a></dt>
<dd><p>Open the trajectory for reading and load first frame.</p>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.TRJ.TRJReader.rewind">
<tt class="descname">rewind</tt><big>(</big><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.TRJ.TRJReader.rewind" title="Permalink to this definition">¶</a></dt>
<dd><p>Reposition at the beginning of the trajectory</p>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="TRR.html" title="5.11. Gromacs TRR file IO — MDAnalysis.coordinates.TRR"
             >next</a> |</li>
        <li class="right" >
          <a href="PQR.html" title="5.9. PQR file format — MDAnalysis.coordinates.PQR"
             >previous</a> |</li>
        <li><a href="../../index.html">MDAnalysis v0.7.5-devel documentation</a> &raquo;</li>
          <li><a href="../coordinates_modules.html" >5. Coordinates modules</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2005-2011, Naveen Michaud-Agrawal, Elizabeth J. Denning, Joshua Adelman,
    Christian Beckstein (logo), David Caplan, Jan Domański, Philip Fowler,
    Joseph Goose, Benjamin Hall, Danny Parton, Tyler Reddy, Paul Rigor,
    and Oliver Beckstein.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
    </div>
  </body>
</html>